-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Add a few more HandshakeRequest parsing tests #13397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| [InlineData("{\"protocol\":\"\",\"version\":10,\"unknown\":null}\u001e", "", 10)] | ||
| [InlineData("{\"protocol\":\"firstProtocol\",\"protocol\":\"secondProtocol\",\"version\":1}\u001e", "secondProtocol", 1)] | ||
| [InlineData("{\"protocol\":\"firstProtocol\",\"protocol\":\"secondProtocol\",\"version\":1,\"version\":75}\u001e", "secondProtocol", 75)] | ||
| [InlineData("{\"protocol\":\"dummy\",\"version\":1,\"ignoredField\":99}\u001e", "dummy", 1)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there's multiple json objects prior to the \u001e delimiter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some tests for escaped property names too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there's multiple json objects prior to the \u001e delimiter.
For the handshake, the parsing logic returns as soon as the end of the json object is found. So the paylod
"{\"protocol\":\"json\",\"version\":1}{\"protocol\":\"wrong\",\"version\":99}\u001e" would result in a Handshake request message with json and version 1.
|
This comment was made automatically. If there is a problem contact [email protected]. I've triaged the above build. |
Adding some tests to check that we properly parse some different unusual
HandshakeRequestmessages. This came out of the meeting earlier today.